package android.view;

import java.util.ArrayList;
import android.util.Log;

import android.graphics.Rect;

public class RectArray extends ArrayList<Rect> {
	public static final String TAG = "RectArray";

	// 20180304,hsl:1. for check broken pw; 2. for undo.
	protected boolean	MERGE_RECT = false;

	protected Rect mBound = new Rect();

	public boolean addRect(Rect object) {
		return super.add(object);
	}

	public Rect getBound() {
		return mBound;
	}

	public void addRects(RectArray rects) {
		Log.d(TAG, "RectArray-addRects:size=" + this.size()
				+",rects.size=" + rects.size());
		if( rects.size() == 0 ) {
			return ;
		}

		for( Rect r : rects) {
//			add(r);
			addRect(r);
		}
	}

	public boolean checkContinous() {
		return true;
	}

	public void setMerge(boolean merge) {
		MERGE_RECT = merge;
	}


	public boolean checkCross(RectArray other) {
		return false;
	}
}